package com.zhiying.domain;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;


@Entity
@Table(name = "cms_user", catalog = "pussinboots_morning")
public class CMS_User  {

	private  final long serialVersionUID = 1L;
	
	//组织对象
    @ManyToOne
	@JoinColumn(name = "organization_id", referencedColumnName = "organization_id")
	private CMS_Organization Organization;
    
	public CMS_Organization getOrganization() {
		return Organization;
	}
	public void setOrganization(CMS_Organization organization) {
		Organization = organization;
	}
	
	private String organizationName;
	

	public String getOrganizationName() {
		return organizationName;
	}
	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}

	/**
     * 管理员ID
     */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "user_id", nullable = false)
	private Long userId;
//    /**
//     * 组织ID
//     */
//	@Column(name = "organization_id", nullable = false)
//	private Long organizationId;
    /**
     * 管理员账号
     */
	@Column(name = "login_name", nullable = false)
	private String loginName;
    /**
     * 管理员密码
     */
	@Column(name = "login_password", nullable = false)
	private String loginPassword;
    /**
     * 加密密码的盐
     */
	private String salt;
    /**
     * 昵称
     */
	@Column(name = "user_name", nullable = false)
	private String userName;
    /**
     * 真实姓名
     */
	@Column(name = "real_name", nullable = false)
	private String realName;
    /**
     * 性别 0=保密/1=男/2=女
     */
	private Integer sex;
    /**
     * 年龄
     */
	private Integer age;
    /**
     * 用户头像
     */
	@Column(name = "pic_img", nullable = false)
	private String picImg;
    /**
     * 状态 0=冻结/1=正常
     */
	private Integer status;
    /**
     * 电子邮箱
     */
	private String email;
    /**
     * 手机号码
     */
	private String telephone;
    /**
     * 最后登录时间
     */
	@Column(name = "last_login_time", nullable = false)
	private Date lastLoginTime;
    /**
     * 最后登录IP
     */
	@Column(name = "last_login_ip", nullable = false)
	private String lastLoginIp;
    /**
     * 创建时间
     */
	@Column(name = "create_time", nullable = false)
	private Date createTime;
    /**
     * 创建者
     */
	@Column(name = "create_by", nullable = false)
	private String createBy;
    /**
     * 更新时间
     */
	@Column(name = "update_time", nullable = false)
	private Date updateTime;
    /**
     * 更新者
     */
	@Column(name = "update_by", nullable = false)
	private String updateBy;
	
	
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
//	public Long getOrganizationId() {
//		return organizationId;
//	}
//	public void setOrganizationId(Long organizationId) {
//		this.organizationId = organizationId;
//	}
	public String getLoginName() {
		return loginName;
	}
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}
	public String getLoginPassword() {
		return loginPassword;
	}
	public void setLoginPassword(String loginPassword) {
		this.loginPassword = loginPassword;
	}
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public Integer getSex() {
		return sex;
	}
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public String getPicImg() {
		return picImg;
	}
	public void setPicImg(String picImg) {
		this.picImg = picImg;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	public Date getLastLoginTime() {
		return lastLoginTime;
	}
	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}
	public String getLastLoginIp() {
		return lastLoginIp;
	}
	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public String getCreateBy() {
		return createBy;
	}
	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getUpdateBy() {
		return updateBy;
	}
	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}
	public  long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
	
}
